﻿using SJC.Services;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSC.Managers
{
    public class UsersTManager
    {
        public static int UpdateSqlDBBuilder()
        {
            return UsersTService.UpdateSqlDBBuilder();
        }
        //登录-->查询           若查询成功返回1
        public static int countByAccount(string account, string password)
        {
            return UsersTService.countByAccount(account, password);
        }
        //显示表格数据方法
        public static DataTable ShowDataTable()
        {
            return UsersTService.ShowDataTable();
        }
        //查询用户名
        public static string selectAccountById(int userId)
        {
            return UsersTService.selectAccountById(userId);
        }







        //重置密码--->更新Pwd     成功返回1
        public static int updatePwd(string newPwd, string emailAddress)
        {
            return UsersTService.updatePwd(newPwd, emailAddress);
        }
        //用户注册-->插入记录        成功返回1
        public static int addUser(string emailAddress, string account, string pwd)
        {
            return UsersTService.addUser(emailAddress, account, pwd);
        }
        //读卡登录-->查询用户        成功返回1
        public static int selectByCarNum(string CarNum)
        {
            return UsersTService.selectByCarNum(CarNum);
        }
    }
}

